package cn.cai.pethome.dept.domain;

import cn.cai.pethome.base.domain.BaseDomain;
import cn.cai.pethome.emp.domain.Employee;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {

    private String sn;//部门编号
    private String name;//部门名称
    private String dirPath;//部门的层级
    private Integer state;//部门的状态

    private Long manager_id;//管理员id
    private Employee manager;
    private Long parent_id;//父级部门id
    private Department parent;

    //去掉无限级数空值的部分,就是在网页上点击新增或者编辑的上级部门选择框下一级，下一级到最后一级有个空的选择框
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();//Department的儿子



}
